package com.example.mydemo1.entity.common;


/**
 * 分页参数对象
 */
public class PageParams<T> {

    private T entityParams;

    private long pageNum = 1;

    private long pageSize = 10;

    public T getEntityParams() {
        return entityParams;
    }

    public void setEntityParams(T entityParams) {
        this.entityParams = entityParams;
    }

    public long getPageNum() {
        if(pageNum<1){
            pageNum = 1;
        }
        return pageNum;
    }

    public void setPageNum(long pageNum) {
        if(pageNum < 1){
            pageNum = 1;
        }
        this.pageNum = pageNum;
    }

    public long getPageSize() {
        if(pageSize<1){
            pageSize = 10;
        }
        return pageSize;
    }

    public void setPageSize(long pageSize) {
        if(pageSize < 1){
            pageSize = 10;
        }
        this.pageSize = pageSize;
    }
}